/*****************************************************************************

File:   InterfaceDataInterfaceImport.java

Date          Build     Author        Version    Comments
27-Dec-12    P-20-20    dshah          $$1        Created

****************************************************************************/
package com.ptc.otkjavaexamples;
import com.ptc.pfc.pfcGeometry.*;
import com.ptc.cipjava.*;
import com.ptc.pfc.pfcSession.*;
import com.ptc.pfc.pfcCommand.*;
import com.ptc.pfc.pfcGlobal.*;
import com.ptc.pfc.pfcModel.*;
import com.ptc.pfc.pfcModelItem.*;
import com.ptc.pfc.pfcFeature.*;
import com.ptc.pfc.pfcSolid.*;
import java.io.*;

import com.ptc.pfc.pfcFamily.*;
import com.ptc.pfc.pfcServer.*;
import com.ptc.pfc.pfcWindow.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.pfc.pfcBase.*;
import com.ptc.wfc.wfcModel.*;
import com.ptc.wfc.wfcGeometry.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.wfc.wfcPart.*;
import com.ptc.pfc.pfcPart.*;
import com.ptc.pfc.pfcDimension.*;
import com.ptc.pfc.pfcAssembly.*;
import com.ptc.pfc.pfcSelect.*;
import com.ptc.pfc.pfcUnits.*;
import com.ptc.pfc.pfcObject.*;
import com.ptc.pfc.pfcUI.*;
import com.ptc.pfc.pfcRelations.*;
import com.ptc.pfc.pfcDetail.*;
import com.ptc.pfc.pfcDrawing.*;
import com.ptc.pfc.pfcView.*;
import com.ptc.pfc.pfcView2D.*;
import com.ptc.pfc.pfcModel2D.*;

class InterfaceDataInterfaceImport
{

	public InterfaceDataInterfaceImport()
	{
	}

	public static InterfaceData OtkUtilInterfaceData()
	{
		try
		{
		WSurfaceDescriptors wSurfDescs = WSurfaceDescriptors.create(); 
		wSurfDescs = SurfaceDescsInterfaceImport.OtkUtilSurfaceDescriptorCreate();
		QuiltDatas wQuiltDatas = QuiltDatas.create();
		wQuiltDatas = QuiltDatasInterfaceImport.OtkUtilQuiltDatasCreate();

		EdgeDescriptors wEdgeDescs = EdgeDescriptors.create();
		 wEdgeDescs = EdgeDescsInterfaceImport.OtkUtilEdgeDescriptorCreate();

		DatumDatas wDatumDatas = DatumDatas.create();
		Vector3D wXAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D wYAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D wZAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Point3D wOrigin1 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );

		WPlaneData WPlaneData1 = wfcGeometry.WPlaneData_Create(wXAxis1, wYAxis1, wZAxis1, wOrigin1);
		PlaneDatumObject WPlaneObject1 = wfcGeometry.PlaneDatumObject_Create(WPlaneData1);
		DatumObject WDatumObject1 = (DatumObject)(WPlaneObject1);

		DatumData WDatumData1 = wfcGeometry.DatumData_Create(2 , "RIGHT" , WDatumObject1);
		wDatumDatas.append(WDatumData1);

		Vector3D wXAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D wYAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D wZAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Point3D wOrigin2 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );

		WPlaneData WPlaneData2 = wfcGeometry.WPlaneData_Create(wXAxis2, wYAxis2, wZAxis2, wOrigin2);
		PlaneDatumObject WPlaneObject2 = wfcGeometry.PlaneDatumObject_Create(WPlaneData2);
		DatumObject WDatumObject2 = (DatumObject)(WPlaneObject2);

		DatumData WDatumData2 = wfcGeometry.DatumData_Create(4 , "TOP" , WDatumObject2);
		wDatumDatas.append(WDatumData2);

		Vector3D wXAxis3 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D wYAxis3 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D wZAxis3 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D wOrigin3 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );

		WPlaneData WPlaneData3 = wfcGeometry.WPlaneData_Create(wXAxis3, wYAxis3, wZAxis3, wOrigin3);
		PlaneDatumObject WPlaneObject3 = wfcGeometry.PlaneDatumObject_Create(WPlaneData3);
		DatumObject WDatumObject3 = (DatumObject)(WPlaneObject3);

		DatumData WDatumData3 = wfcGeometry.DatumData_Create(6 , "FRONT" , WDatumObject3);
		wDatumDatas.append(WDatumData3);

		Vector3D wXAxis4 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D wYAxis4 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D wZAxis4 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D wOrigin4 = otkCreateIntfDataUtils.CreatePfcVector3D( 0.0 , 0.0 , 0.0 );

		WCsysData WCsysData4 = wfcGeometry.WCsysData_Create(wXAxis4, wYAxis4, wZAxis4, wOrigin4);
		CsysDatumObject WCsysObject4 = wfcGeometry.CsysDatumObject_Create(WCsysData4);
		DatumObject WDatumObject4 = (DatumObject)(WCsysObject4);

		DatumData WDatumData4 = wfcGeometry.DatumData_Create(8 , "PRT_CSYS_DEF" , WDatumObject4);
		wDatumDatas.append(WDatumData4);

		// type : CURVE_COMPOSITE
		CurveDescriptors  pCurveDescs5 = CurveDescriptors.create();
		// type : CURVE_LINE
		Point3D  WDComp_5Point11 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );
		Point3D  WDComp_5Point21 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , -254.26904688473223 , 0.0 );
		LineDescriptor  WDComp_5LineDesc1 = pfcGeometry.LineDescriptor_Create(WDComp_5Point11, WDComp_5Point21);
		CurveDescriptor  WDComp_5CurveDesc1 = (CurveDescriptor)(WDComp_5LineDesc1); 

		pCurveDescs5.append(WDComp_5CurveDesc1);

		// type : CURVE_LINE
		Point3D  WDComp_5Point12 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , -254.26904688473223 , 0.0 );
		Point3D  WDComp_5Point22 = otkCreateIntfDataUtils.CreatePfcPoint3D( 254.26904688473223 , -254.26904688473223 , 0.0 );
		LineDescriptor  WDComp_5LineDesc2 = pfcGeometry.LineDescriptor_Create(WDComp_5Point12, WDComp_5Point22);
		CurveDescriptor  WDComp_5CurveDesc2 = (CurveDescriptor)(WDComp_5LineDesc2); 

		pCurveDescs5.append(WDComp_5CurveDesc2);

		// type : CURVE_LINE
		Point3D  WDComp_5Point13 = otkCreateIntfDataUtils.CreatePfcPoint3D( 254.26904688473223 , -254.26904688473223 , 0.0 );
		Point3D  WDComp_5Point23 = otkCreateIntfDataUtils.CreatePfcPoint3D( 254.26904688473223 , 0.0 , 0.0 );
		LineDescriptor  WDComp_5LineDesc3 = pfcGeometry.LineDescriptor_Create(WDComp_5Point13, WDComp_5Point23);
		CurveDescriptor  WDComp_5CurveDesc3 = (CurveDescriptor)(WDComp_5LineDesc3); 

		pCurveDescs5.append(WDComp_5CurveDesc3);

		// type : CURVE_LINE
		Point3D  WDComp_5Point14 = otkCreateIntfDataUtils.CreatePfcPoint3D( 254.26904688473223 , 0.0 , 0.0 );
		Point3D  WDComp_5Point24 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );
		LineDescriptor  WDComp_5LineDesc4 = pfcGeometry.LineDescriptor_Create(WDComp_5Point14, WDComp_5Point24);
		CurveDescriptor  WDComp_5CurveDesc4 = (CurveDescriptor)(WDComp_5LineDesc4); 

		pCurveDescs5.append(WDComp_5CurveDesc4);

		CurveDirections  WDCompDirs5 = CurveDirections.create();
		WDCompDirs5.append(CurveDirection.CURVE_NO_FLIP);
		WDCompDirs5.append(CurveDirection.CURVE_NO_FLIP);
		WDCompDirs5.append(CurveDirection.CURVE_NO_FLIP);
		WDCompDirs5.append(CurveDirection.CURVE_NO_FLIP);
		WCompositeCurveDescriptor  WDwCompCurveDesc5 = wfcGeometry.WCompositeCurveDescriptor_Create(pCurveDescs5);
		 WDwCompCurveDesc5.SetCompDirections(WDCompDirs5);
		CompositeCurveDescriptor  WDCompCurveDesc5 = (CompositeCurveDescriptor)(WDwCompCurveDesc5);
		CurveDescriptor  WDCurveDesc5 = (CurveDescriptor)(WDCompCurveDesc5); 

		CurveDatumObject WCurveObject5 = wfcGeometry.CurveDatumObject_Create(WDCurveDesc5);
		DatumObject WDatumObject5 = (DatumObject)(WCurveObject5);

		DatumData WDatumData5 = wfcGeometry.DatumData_Create(43 , "43" , WDatumObject5);
		wDatumDatas.append(WDatumData5);

		// type : CURVE_COMPOSITE
		CurveDescriptors  pCurveDescs6 = CurveDescriptors.create();
		// type : CURVE_ARC
		Vector3D  WDComp_6ArcVector11 = otkCreateIntfDataUtils.CreatePfcVector3D( 1.0 , 0.0 , 0.0 );
		Vector3D  WDComp_6ArcVector21 = otkCreateIntfDataUtils.CreatePfcVector3D( 0.0 , 1.0 , 0.0 );
		Point3D  WDComp_6ArcPoint1 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133532 , -179.59947889684963 , 0.0 );
		ArcDescriptor  WDComp_6ArcDesc1 = pfcGeometry.ArcDescriptor_Create(WDComp_6ArcVector11, WDComp_6ArcVector21, WDComp_6ArcPoint1,0.0, 3.141592653589793, 72.99460551630997 );
		CurveDescriptor  WDComp_6CurveDesc1 = (CurveDescriptor)(WDComp_6ArcDesc1);

		pCurveDescs6.append(WDComp_6CurveDesc1);

		// type : CURVE_ARC
		Vector3D  WDComp_6ArcVector12 = otkCreateIntfDataUtils.CreatePfcVector3D( -1.0 , 0.0 , 0.0 );
		Vector3D  WDComp_6ArcVector22 = otkCreateIntfDataUtils.CreatePfcVector3D( 0.0 , -1.0 , 0.0 );
		Point3D  WDComp_6ArcPoint2 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133532 , -179.59947889684963 , 0.0 );
		ArcDescriptor  WDComp_6ArcDesc2 = pfcGeometry.ArcDescriptor_Create(WDComp_6ArcVector12, WDComp_6ArcVector22, WDComp_6ArcPoint2,0.0, 3.141592653589793, 72.99460551630997 );
		CurveDescriptor  WDComp_6CurveDesc2 = (CurveDescriptor)(WDComp_6ArcDesc2);

		pCurveDescs6.append(WDComp_6CurveDesc2);

		CurveDirections  WDCompDirs6 = CurveDirections.create();
		WDCompDirs6.append(CurveDirection.CURVE_NO_FLIP);
		WDCompDirs6.append(CurveDirection.CURVE_NO_FLIP);
		WCompositeCurveDescriptor  WDwCompCurveDesc6 = wfcGeometry.WCompositeCurveDescriptor_Create(pCurveDescs6);
		 WDwCompCurveDesc6.SetCompDirections(WDCompDirs6);
		CompositeCurveDescriptor  WDCompCurveDesc6 = (CompositeCurveDescriptor)(WDwCompCurveDesc6);
		CurveDescriptor  WDCurveDesc6 = (CurveDescriptor)(WDCompCurveDesc6); 

		CurveDatumObject WCurveObject6 = wfcGeometry.CurveDatumObject_Create(WDCurveDesc6);
		DatumObject WDatumObject6 = (DatumObject)(WCurveObject6);

		DatumData WDatumData6 = wfcGeometry.DatumData_Create(79 , "79" , WDatumObject6);
		wDatumDatas.append(WDatumData6);

		// type : CURVE_LINE
		Point3D  WDPoint17 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133534 , -179.59947889684963 , 0.0 );
		Point3D  WDPoint27 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133531 , -179.59947889684963 , 75.0 );
		LineDescriptor  WDLineDesc7 = pfcGeometry.LineDescriptor_Create(WDPoint17, WDPoint27);
		CurveDescriptor  WDCurveDesc7 = (CurveDescriptor)(WDLineDesc7); 

		CurveDatumObject WCurveObject7 = wfcGeometry.CurveDatumObject_Create(WDCurveDesc7);
		DatumObject WDatumObject7 = (DatumObject)(WCurveObject7);

		DatumData WDatumData7 = wfcGeometry.DatumData_Create(97 , "A_1" , WDatumObject7);
		wDatumDatas.append(WDatumData7);

		// type : CURVE_LINE
		Point3D  WDPoint18 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133532 , -179.59947889684963 , 0.0 );
		Point3D  WDPoint28 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133531 , -179.59947889684963 , 75.0 );
		LineDescriptor  WDLineDesc8 = pfcGeometry.LineDescriptor_Create(WDPoint18, WDPoint28);
		CurveDescriptor  WDCurveDesc8 = (CurveDescriptor)(WDLineDesc8); 

		CurveDatumObject WCurveObject8 = wfcGeometry.CurveDatumObject_Create(WDCurveDesc8);
		DatumObject WDatumObject8 = (DatumObject)(WCurveObject8);

		DatumData WDatumData8 = wfcGeometry.DatumData_Create(203 , "203" , WDatumObject8);
		wDatumDatas.append(WDatumData8);

		Vector3D wXAxis9 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.9999999999999999 , 0.0 , 0.0 );
		Vector3D wYAxis9 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.9999999999999999 , 0.0 );
		Vector3D wZAxis9 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 0.9999999999999999 );
		Vector3D wOrigin9 = otkCreateIntfDataUtils.CreatePfcVector3D( 0.0 , 0.0 , 0.0 );

		WCsysData WCsysData9 = wfcGeometry.WCsysData_Create(wXAxis9, wYAxis9, wZAxis9, wOrigin9);
		CsysDatumObject WCsysObject9 = wfcGeometry.CsysDatumObject_Create(WCsysData9);
		DatumObject WDatumObject9 = (DatumObject)(WCsysObject9);

		DatumData WDatumData9 = wfcGeometry.DatumData_Create(204 , "CS0" , WDatumObject9);
		wDatumDatas.append(WDatumData9);

		Vector3D wXAxis10 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D wYAxis10 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D wZAxis10 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D wOrigin10 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );

		WPlaneData WPlaneData10 = wfcGeometry.WPlaneData_Create(wXAxis10, wYAxis10, wZAxis10, wOrigin10);
		PlaneDatumObject WPlaneObject10 = wfcGeometry.PlaneDatumObject_Create(WPlaneData10);
		DatumObject WDatumObject10 = (DatumObject)(WPlaneObject10);

		DatumData WDatumData10 = wfcGeometry.DatumData_Create(197 , "xy-plane" , WDatumObject10);
		wDatumDatas.append(WDatumData10);

		Vector3D wXAxis11 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D wYAxis11 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D wZAxis11 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Point3D wOrigin11 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );

		WPlaneData WPlaneData11 = wfcGeometry.WPlaneData_Create(wXAxis11, wYAxis11, wZAxis11, wOrigin11);
		PlaneDatumObject WPlaneObject11 = wfcGeometry.PlaneDatumObject_Create(WPlaneData11);
		DatumObject WDatumObject11 = (DatumObject)(WPlaneObject11);

		DatumData WDatumData11 = wfcGeometry.DatumData_Create(198 , "yz-plane" , WDatumObject11);
		wDatumDatas.append(WDatumData11);

		Vector3D wXAxis12 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D wYAxis12 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D wZAxis12 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Point3D wOrigin12 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );

		WPlaneData WPlaneData12 = wfcGeometry.WPlaneData_Create(wXAxis12, wYAxis12, wZAxis12, wOrigin12);
		PlaneDatumObject WPlaneObject12 = wfcGeometry.PlaneDatumObject_Create(WPlaneData12);
		DatumObject WDatumObject12 = (DatumObject)(WPlaneObject12);

		DatumData WDatumData12 = wfcGeometry.DatumData_Create(199 , "zx-plane" , WDatumObject12);
		wDatumDatas.append(WDatumData12);

		Vector3D wXAxis13 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D wYAxis13 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D wZAxis13 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Point3D wOrigin13 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );

		WPlaneData WPlaneData13 = wfcGeometry.WPlaneData_Create(wXAxis13, wYAxis13, wZAxis13, wOrigin13);
		PlaneDatumObject WPlaneObject13 = wfcGeometry.PlaneDatumObject_Create(WPlaneData13);
		DatumObject WDatumObject13 = (DatumObject)(WPlaneObject13);

		DatumData WDatumData13 = wfcGeometry.DatumData_Create(200 , "RIGHT" , WDatumObject13);
		wDatumDatas.append(WDatumData13);

		Vector3D wXAxis14 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D wYAxis14 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D wZAxis14 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Point3D wOrigin14 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );

		WPlaneData WPlaneData14 = wfcGeometry.WPlaneData_Create(wXAxis14, wYAxis14, wZAxis14, wOrigin14);
		PlaneDatumObject WPlaneObject14 = wfcGeometry.PlaneDatumObject_Create(WPlaneData14);
		DatumObject WDatumObject14 = (DatumObject)(WPlaneObject14);

		DatumData WDatumData14 = wfcGeometry.DatumData_Create(201 , "TOP" , WDatumObject14);
		wDatumDatas.append(WDatumData14);

		Vector3D wXAxis15 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D wYAxis15 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D wZAxis15 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D wOrigin15 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );

		WPlaneData WPlaneData15 = wfcGeometry.WPlaneData_Create(wXAxis15, wYAxis15, wZAxis15, wOrigin15);
		PlaneDatumObject WPlaneObject15 = wfcGeometry.PlaneDatumObject_Create(WPlaneData15);
		DatumObject WDatumObject15 = (DatumObject)(WPlaneObject15);

		DatumData WDatumData15 = wfcGeometry.DatumData_Create(202 , "FRONT" , WDatumObject15);
		wDatumDatas.append(WDatumData15);

		Outline3D wOutline = Outline3D.create();
		Point3D wPoint1 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0, -254.26904688473223, -1.8189894035458565E-12 );
		Point3D wPoint2 = otkCreateIntfDataUtils.CreatePfcPoint3D( 254.26904688473223, 0.0, 75.0 );
		wOutline.set(0, wPoint1);
		wOutline.set(1, wPoint2);

		Double value = new Double(0.0);		InterfaceData InterfaceData = wfcModel.InterfaceData_Create(wSurfDescs, wEdgeDescs, wQuiltDatas, wDatumDatas, Accuracytype.ACCU_RELATIVE, value, wOutline);
		return(InterfaceData);
		}
		catch (Exception e)
		{
		System.out.println(e);
		}
		return null;
	}
};
